-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Improve wallet show output.
#4927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Some(ChainOrigin::Root(i)) => format!("Root Chain {i}"), | ||
| _ => "Child Chain".to_string(), | ||
| println!("-----------------------"); | ||
| println!(" {:<20} {}", "Chain ID:", self.user_chain.chain_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could almost remove the indentation if we wanted now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer that?
Do you mean remove the two leading spaces, or remove the alignment of the values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the leading spaces
This is the result after a few discussions about what `wallet show`
should look like.
Add separators between the chains. Format everything in a "Key: Value"
style.
Sample output:
```
2025-11-06T16:46:41.842672Z INFO linera: Reading wallet from file: /tmp/.tmp6RClv1/wallet_0.json
2025-11-06T16:46:41.843635Z INFO linera_service::wallet: Found 4 chains
-----------------------
Chain ID: 7471c597d573ef4d53934b9fcc6a05b9d46cb3718244d01ff817234ac2ae8c28
Tags: DEFAULT, ADMIN
Parent chain: -
Default owner: 0x227d131b5f2e3987daf184f2d22af7e7e0f174d2baca1228a45f12be11e80a5c
Timestamp: 2025-11-06 16:46:37.399799
Blocks: 1
Epoch: 0
Latest block hash: 718814dae46334008efb769d5c24521c879cd756bb600c2bb56b09c1609d4c52
-----------------------
Chain ID: 5d719d9ace5441bdd4e4f7469fb3335445813935fdc2acc0dff60162642f2787
Parent chain: -
Default owner: 0x929139f3c9b52dac48795038b7427aa5d07333718f74de7ea21c40fc28c11ae6
Timestamp: 2025-11-06 16:46:22.179469
Blocks: 0
Epoch: 0
-----------------------
```
- These changes should be backported to `testnet_conway`, then
- be released in a new SDK.
- Previous `wallet show` change:
linera-io#4642
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
This is the result after a few discussions about what `wallet show`
should look like.
Add separators between the chains. Format everything in a "Key: Value"
style.
Sample output:
```
2025-11-06T16:46:41.842672Z INFO linera: Reading wallet from file: /tmp/.tmp6RClv1/wallet_0.json
2025-11-06T16:46:41.843635Z INFO linera_service::wallet: Found 4 chains
-----------------------
Chain ID: 7471c597d573ef4d53934b9fcc6a05b9d46cb3718244d01ff817234ac2ae8c28
Tags: DEFAULT, ADMIN
Parent chain: -
Default owner: 0x227d131b5f2e3987daf184f2d22af7e7e0f174d2baca1228a45f12be11e80a5c
Timestamp: 2025-11-06 16:46:37.399799
Blocks: 1
Epoch: 0
Latest block hash: 718814dae46334008efb769d5c24521c879cd756bb600c2bb56b09c1609d4c52
-----------------------
Chain ID: 5d719d9ace5441bdd4e4f7469fb3335445813935fdc2acc0dff60162642f2787
Parent chain: -
Default owner: 0x929139f3c9b52dac48795038b7427aa5d07333718f74de7ea21c40fc28c11ae6
Timestamp: 2025-11-06 16:46:22.179469
Blocks: 0
Epoch: 0
-----------------------
```
- These changes should be backported to `testnet_conway`, then
- be released in a new SDK.
- Previous `wallet show` change:
#4642
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
Motivation
This is the result after a few discussions about what
wallet showshould look like.Proposal
Add separators between the chains. Format everything in a "Key: Value" style.
Test Plan
Sample output:
Release Plan
testnet_conway, thenLinks
wallet showchange: Improvewallet show. #4642